package com.cloud.monitor.sys.controller;

import com.cloud.monitor.sys.mapper.NodeDataGetMapper;
import com.cloud.monitor.sys.entity.nodelayer.CPU;
import com.cloud.monitor.sys.service.DataGetControllerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wurj
 * @time 2020/3/10 22:41
 * @description
 */

@RestController
public class DataGetController {

    @Autowired
    private DataGetControllerService dataGetControllerService;

    @ApiOperation("CPU使用量查询")
    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public List<CPU> getCPUUsage(){
        return dataGetControllerService.getCPU();
    }
}
